home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c
- Subject: Re: Printing to LPT1 Printer from within program
- Date: Thu, 25 Jan 1996 13:45:39 +0200
- Organization: Carelcomp Forest
- Message-ID: <31076D63.289D@cmt.lpr.mail.carel.fi>
- References: <4e5ee9$m28_001@pr.mcs.net>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
-
- Michael D. Perry wrote:
- >
- > I have just started taking a C programming class and am using Borland
- > C++ v4.0 at home. Both my teacher and I are stumped as to how to
- > print to a LPT (Line Printer) device from within the program.
- >
- > I have read the FAQ and there are some references to this but not
- > enough that I can quite figure it out. As near as I can figure you
- > can use iostreams or fprintf() with the later appearing to be the
- > simpler of the two. With that, from what I have seen, one uses a
- > filename of stdprn but I get an error message when compiling. My
- > guess is that there is a header file or a definition/declaration
- > statement that needs to be referenced.
- > [rest snipped]
-
- Have you tried:
-
- #include <stdio.h>
-
- int main(int argc, char **argv)
- {
- while (argc--)
- fprintf(stderr, "%s\n", *argv++);
- }
-
- Later,
- AriL
- --
- All my opinions are mine and mine alone.
-